package models;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


/**
 *
 * @author KGB
 */
public class Hand {
    Card hand[]= new Card [5];
    int [] wynik = new int[10];
    
    int numer;
    Hand(int numer){
        this.numer=numer;
    }
    void wypisz (){
    	for(int i=0;i<10;i++){
    		System.out.println(wynik[i]);
    	}
    }
    void zapis (){ // metoda zamieniajaca cyfry na symbloe kart z pokera od 2 do A
        System.out.println("Gracz nr :"+(numer));
        for(int i=0;i<5;i++){
            if(hand[i].figura==0){
                System.out.print("2"+"("+hand[i].kolor+") ");
            }
             if(hand[i].figura==1){
                System.out.print("3"+"("+hand[i].kolor+") ");
            }
              if(hand[i].figura==2){
                System.out.print("4"+"("+hand[i].kolor+") ");
            }
               if(hand[i].figura==3){
                System.out.print("5"+"("+hand[i].kolor+") ");
            } 
                if(hand[i].figura==4){
                System.out.print("6"+"("+hand[i].kolor+") ");
            }
                 if(hand[i].figura==5){
                System.out.print("7"+"("+hand[i].kolor+") ");
            }
                  if(hand[i].figura==6){
                System.out.print("8"+"("+hand[i].kolor+") ");
            }
                   if(hand[i].figura==7){
                System.out.print("9"+"("+hand[i].kolor+") ");
            }
                    if(hand[i].figura==8){
                System.out.print("10"+"("+hand[i].kolor+") ");
            }
                     if(hand[i].figura==9){
                System.out.print("J"+"("+hand[i].kolor+") ");
            }
                      if(hand[i].figura==10){
                System.out.print("D"+"("+hand[i].kolor+") ");
            }
                       if(hand[i].figura==11){
                System.out.print("K"+"("+hand[i].kolor+") ");
            }
                       if(hand[i].figura==12){
                System.out.print("A"+"("+hand[i].kolor+") ");
            }
        }
         System.out.println("\n");
    }
    
     void changecardbot(int ile,Deck deck){
    	 for(int i=0;i<ile;i++){
    		 for(int j=0;j<5;j++){
    			
    			 if(hand[j].figura==wynik[(8-i)]){
    				 
    				 hand[j]=deck.givecard();
    				 break;
    			 }
    		 }
    	 }
     }
     
}

